<template>
    <div>
        <p>Count:{{ state.count }}</p>
        <button @click="increment">增加值</button>
    </div>
</template>
<script>
import { reactive } from 'vue';

export default{
    setup() {
        const state = reactive({
            count:0,
        });
        const increment = () => {
            state.count++;
        };
        return {
            state,
            increment
        };
    },
};
</script>
